package com.javademo.quenetest;

import lombok.extern.slf4j.Slf4j;

import java.util.ArrayDeque;
import java.util.Deque;

@Slf4j
public class DequeTest {
    public static void main(String[] args) {
        Deque<String> deque = new ArrayDeque<>();
        inputTest(deque);
        log.info("deque:{}", deque);
        deque.offerFirst("x");
        log.info("deque:{}", deque);
        log.info("deque.pollLast():{}", deque.pollFirst());
    }

    private static void inputTest(Deque<String> deque) {
        deque.offer("1");
        deque.offer("2");
        deque.offer("3");
        deque.offer("4");
    }
}
